package com.zhiyizhen.handheld.component.personal.api;

import com.zhiyizhen.handheld.component.personal.bean.AvatarReq;
import com.zhiyizhen.handheld.component.personal.bean.ModifyPasswordReq;
import com.zhiyizhen.handheld.net.response.ResponseData;


import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface IPersonalService {

    // 上传图片到服务器
    @Multipart
    @POST("/web/file/upload")
    Observable<ResponseData<String>> uploadFile(@Header("token") String token, @Part MultipartBody.Part image);

    /**
     * 更新头像和简介
     */
    @POST("/web/clinic/emp/updateNotes")
    Observable<ResponseData<String>> updateUserInfo(@Header("token") String token, @Header("clinicId") String clinicId, @Body AvatarReq avatarReq);

    /**
     * 修改密码
     */
    @POST("/web/clinic/emp/updatePassword")
    Observable<ResponseData<String>> updatePassword(@Header("token") String token, @Header("clinicId") String clinicId, @Body ModifyPasswordReq modifyPasswordReq);

}
